// 立案登记 api
import request from '@/utils/request'

// 查询立案登记列表
export function getRegistrationcase(data) {
  return request({
    url: '/ruoyi-system/registrationcase/list',
    method: 'get',
    params: data,
  })
}

// 预览立案登记
export function registrationcasePreview(id) {
  return request({
    url: '/ruoyi-system/registrationcase/preview?id=' + id,
    method: 'get',
  })
}

// 详情页预览
export function registrationcasePreviewPdf(data) {
  return request({
    url: '/ruoyi-system/registrationcase/pdfPreview',
    method: 'post',
    data,
  })
}

// 获取详情
export function registrationcaseDetail(id) {
  return request({
    url: '/ruoyi-system/registrationcase/' + id,
    method: 'get',
  })
}

// 上传附件
export function registrationcaseAddFiles(data) {
  return request({
    url: '/ruoyi-system/registrationcase/addFiles',
    method: 'post',
    data,
  })
}

// 保存草稿
export function registrationcaseAdd(data) {
  return request({
    url: '/ruoyi-system/registrationcase',
    method: 'post',
    data,
  })
}

// 提交
export function registrationcaseSubmit(data) {
  return request({
    url: '/ruoyi-system/registrationcase/submit',
    method: 'post',
    data,
  })
}

// 修改
export function registrationcaseUpdate(data) {
  return request({
    url: '/ruoyi-system/registrationcase',
    method: 'put',
    data,
  })
}

// 删除
export function registrationcaseDelete(ids) {
  return request({
    url: '/ruoyi-system/registrationcase/' + ids,
    method: 'delete',
  })
}

// 文案 模糊搜索
export function commontermsGet(params) {
  return request({
    url: '/ruoyi-system/commonterms/list',
    method: 'get',
    params,
  })
}

// 检查情况
export function penaltydecisionsGetContent(id) {
  return request({
    url: '/ruoyi-system/penaltydecisions/getContent',
    method: 'get',
    params: {
      caseId: id,
    },
  })
}

// 审核
export function registrationcaseReview(data) {
  return request({
    url: '/ruoyi-system/registrationcase/review',
    method: 'post',
    data,
  })
}

// 导出授权委托书
export function exportPenaltydecisions(data) {
  return request({
    url: '/ruoyi-system/registrationcase/exportPowerOfAttorney',
    method: 'post',
    data,
    responseType: 'blob',
  })
}
// 导出送达信息确认书
export function exportDeliveryConfirmation(data) {
  return request({
    url: '/ruoyi-system/registrationcase/exportAcknowledgement',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 立案审批表
export function exportFilingApprovalForm(data) {
  return request({
    url: '/ruoyi-system/registrationcase/export',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 转办接口
export function transferRegistrationcase(data) {
  return request({
    url: '/ruoyi-system/registrationcase/transferTask',
    method: 'post',
    data,
  })
}

// 获取未绑定的现场检查
export function getUnboundSiteInspections(params) {
  return request({
    url: '/ruoyi-system/siteinspectionrecord/noCaseList',
    method: 'get',
    params,
  })
}
